/**
 * elancom Corporation copy right 2012 - 2015  
 *   
 * $Header$
 * $Id$
 * $Author$
 * $Date$
 * $Revision$
 */
package com.elancom.framework.web.context;

import java.util.Enumeration;

import javax.servlet.ServletContext;
import javax.servlet.http.HttpSession;

import com.elancom.framework.context.SessionContext;

/**
 * @author elancom
 * @date 2012-7-13
 */
public class StandardSessionContext implements SessionContext {
	private HttpSession session;

	/**
	 * @param session
	 */
	public StandardSessionContext(HttpSession session) {
		super();
		this.session = session;
	}

	/**
	 * @param arg0
	 * @return
	 * @see javax.servlet.http.HttpSession#getAttribute(java.lang.String)
	 */
	public Object getAttribute(String arg0) {
		return session.getAttribute(arg0);
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getAttributeNames()
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Enumeration getAttributeNames() {
		return session.getAttributeNames();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getCreationTime()
	 */
	public long getCreationTime() {
		return session.getCreationTime();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getId()
	 */
	public String getId() {
		return session.getId();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getLastAccessedTime()
	 */
	public long getLastAccessedTime() {
		return session.getLastAccessedTime();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getMaxInactiveInterval()
	 */
	public int getMaxInactiveInterval() {
		return session.getMaxInactiveInterval();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#getServletContext()
	 */
	public ServletContext getServletContext() {
		return session.getServletContext();
	}

	/**
	 * @param arg0
	 * @return
	 * @deprecated
	 * @see javax.servlet.http.HttpSession#getValue(java.lang.String)
	 */
	public Object getValue(String arg0) {
		return session.getValue(arg0);
	}

	/**
	 * @return
	 * @deprecated
	 * @see javax.servlet.http.HttpSession#getValueNames()
	 */
	public String[] getValueNames() {
		return session.getValueNames();
	}

	/**
	 * 
	 * @see javax.servlet.http.HttpSession#invalidate()
	 */
	public void invalidate() {
		session.invalidate();
	}

	/**
	 * @return
	 * @see javax.servlet.http.HttpSession#isNew()
	 */
	public boolean isNew() {
		return session.isNew();
	}

	/**
	 * @param arg0
	 * @param arg1
	 * @deprecated
	 * @see javax.servlet.http.HttpSession#putValue(java.lang.String, java.lang.Object)
	 */
	public void putValue(String arg0, Object arg1) {
		session.putValue(arg0, arg1);
	}

	/**
	 * @param arg0
	 * @see javax.servlet.http.HttpSession#removeAttribute(java.lang.String)
	 */
	public void removeAttribute(String arg0) {
		session.removeAttribute(arg0);
	}

	/**
	 * @param arg0
	 * @deprecated
	 * @see javax.servlet.http.HttpSession#removeValue(java.lang.String)
	 */
	public void removeValue(String arg0) {
		session.removeValue(arg0);
	}

	/**
	 * @param arg0
	 * @param arg1
	 * @see javax.servlet.http.HttpSession#setAttribute(java.lang.String, java.lang.Object)
	 */
	public void setAttribute(String arg0, Object arg1) {
		session.setAttribute(arg0, arg1);
	}

	/**
	 * @param arg0
	 * @see javax.servlet.http.HttpSession#setMaxInactiveInterval(int)
	 */
	public void setMaxInactiveInterval(int arg0) {
		session.setMaxInactiveInterval(arg0);
	}

}
